using System;
using System.Collections.Generic;
using System.Text;
using FluentNHibernate.Mapping;
using Water.Model;

namespace Water.Data.Repositories.Mappings
{
    public class UpdateWaterMap : ClassMap<UpdateWater>
    {
        public UpdateWaterMap()
        {
            Table("Tbt_UpdateWater");
            LazyLoad();
            Id(x => x.MRNO).GeneratedBy.Assigned().Column("MRNO");
            Map(x => x.EpcNo).Column("EpcNO").Not.Nullable();
            References<Meter>(x => x.Mt, "EpcNO").PropertyRef("EpcNO").Not.Nullable().ReadOnly();
            Map(x => x.UpdateDt).Column("UpdateDt").Not.Nullable();
            Map(x => x.WaterName).Column("WaterName").Not.Nullable();
            Map(x => x.WaterKJ).Column("WaterKJ").Not.Nullable();
            Map(x => x.WaterNo).Column("WaterNo").Not.Nullable();
            Map(x => x.Memo).Column("Memo");
            Map(x => x.UpdateEmp).Column("UpdateEmp").Not.Nullable();
            Map(x => x.CreateDt).Column("CreateDt").ReadOnly();

        }
    }
}
